const React = require('react');
const {Route, Link, Switch} = require('react-router-dom');
const IndexPage = require('./components/Index.jsx');
const AboutPage = require('./components/About.jsx');
const Clock = require('./components/Clock.jsx')
const Page404 = require('./components/404.jsx')
const Button = require('antd/es/button').default

module.exports = class App extends React.Component {
    render() {
        return (
            <div>
                <Button type="primary">Primary</Button>
                <div>
                    你好
                </div>
                <div id="list">
                    <ul>
                        <li><Link to="/home">Index</Link></li>
                        <li><Link to="/about">About</Link></li>
                        <li><Link to="/clock">Clock</Link></li>
                        <li><Link to="/app">404</Link></li>
                    </ul>
                </div>
                <Switch>
                    <Route path='/home' component={IndexPage}></Route>
                    <Route path='/about' component={AboutPage} exact></Route>
                    <Route path='/clock' component={Clock.default} exact></Route>
                    <Route component={Page404}/>
                </Switch>
            </div>
        );
    }
}
